from selenium.webdriver.common.by import By


class AddGoddspage:
    def login(self,driver,username,password):
        element = driver.find_element(By.CSS_SELECTOR, '[name="username"]')
        # 操作
        element.clear()
        element.send_keys(username)
        # 2、输入密码
        element = driver.find_element(By.CSS_SELECTOR, '[name="password"]')
        # 操作
        element.clear()
        element.send_keys(password)
        # 3、点击登录
        element = driver.find_element(By.CSS_SELECTOR, '.el-button.el-button--primary.el-button--medium')
        element.click()
